package com.battle.service.controller.web;

import com.battle.pojo.param.motionEvaluation.*;
import com.battle.pojo.vo.motionEvaluation.*;
import com.battle.service.service.in.*;
import nirvana.core.domains.vo.ApiResult;
import nirvana.core.domains.vo.PageResult;
import org.springframework.web.bind.annotation.*;

import jakarta.validation.Valid;

import java.util.List;

/**
 * web/运动评估参数
 * 【描 述】：
 * 【环 境】：J2SE
 * 【详 细】：
 */
@RestController
@RequestMapping("/motionEvaluation/web")
public class MotionEvaluationWebController {

    private final MotionEvaluationService service;

    public MotionEvaluationWebController(MotionEvaluationService service) {
        this.service = service;
    }

    /**
     * 修改运动评估参数
     *
     * @param param
     */
    @PutMapping("/editMotionEvaluation")
    public ApiResult editMotionEvaluation(@RequestBody @Valid EditMotionEvaluationParam param) {
        service.editMotionEvaluation(param);
        return ApiResult.ok();
    }


    /**
     * 获取运动评估参数详情
     *
     * @param
     * @return
     */
    @GetMapping("/getMotionEvaluation")
    public ApiResult<GetMotionEvaluationVo> getMotionEvaluation() {
        GetMotionEvaluationVo vo = service.getMotionEvaluation();
        return ApiResult.ok(vo);
    }


}

